A thermal air flowmeter that can directly detect quantity of airflow has become mainstream of air flowmeters. In particular, a thermal air flowmeter including a measuring element produced by a semiconductor machining technique has gained attention, since it can reduce cost, and it can be driven with low electric power. Japanese Unexamined Patent Publication No. 10-311750 describes a measuring element (thermal airflow sensor) used for the thermal airflow meter described above. In the thermal air flowmeter described in this Publication, an electric insulating film is formed on a semiconductor substrate, a resistance heating element and a resistance temperature detector are formed on the electric insulating film, and an electric insulator is formed on the resistance heating element and the resistance temperature detector. The region where the resistance heating element and the resistance temperature detector are formed has a diaphragm structure that is formed by removing a part of the semiconductor substrate through anisotropic etching from the backside of the semiconductor substrate.